
export class RetCodeDefine {

    public static OK: number = 1; //正确
    public static RegisterError_HadUser: number = 2; //注册失败已存在改用户
    public static Error_Param:number = 3; //参数错误
    public static LoginError_NoUser: number = 4; //登录不存在改用户
    public static LoginError_NoPass: number = 5; //登录密码错误
    public static LoginError_Forbid: number = 6; //禁止登录
    public static LoginError_MultiLogin: number = 7; //异地登录
    public static LoginError_NoLogin: number = 8; //没登录就发命令
    public static LoginError_token: number = 8; //token错误
    


    public static code2Msg: Map<number, string> = new Map<number, string>().
        set(RetCodeDefine.OK, "OK").
        set(RetCodeDefine.RegisterError_HadUser, "注册失败已存在用户").
        set(RetCodeDefine.LoginError_NoUser, "不存在该用户").
        set(RetCodeDefine.Error_Param, "参数错误").
        set(RetCodeDefine.LoginError_NoPass, "密码错误").
        set(RetCodeDefine.LoginError_Forbid, "禁止登录，请联系相关人员").
        set(RetCodeDefine.LoginError_MultiLogin, "异地登录!").
        set(RetCodeDefine.LoginError_NoLogin, "未登录!").
        set(RetCodeDefine.LoginError_token, "token已过期")

}